//主要写ajax请求

import axios from "./axios.ts"
//请求书城的上方导航
export const getShopNav = () => axios.get('store/navi.json');
//请求书城的精选数据
export const getCherryPickInfo = (uuid: any) => axios.get(`store/show.json?type=recommend&uuid=${uuid}`);
//请求书城的免费数据
export const getBookFreeInfo = (uuid: any) => axios.get(`store/show.json?type=recommend&uuid=${uuid}`);
//请求书城男生数据
export const getBookManInfo = (uuid: any) => axios.get(`store/show.json?type=recommend&uuid=${uuid}`);
//请求书城女生数据
export const getBookWomanInfo = (uuid: any) => axios.get(`store/show.json?type=recommend&uuid=${uuid}`);
//请求书城出版数据
export const getBookPublishInfo = (uuid: any) => axios.get(`store/show.json?type=recommend&uuid=${uuid}`);
//获取书城听书数据
export const getBookListenInfo = (uuid: any) => axios.get(`store/show.json?type=recommend&uuid=${uuid}`);
//请求榜单数据
export const getRankInfo = (url: any) => axios.get(url);
//请求榜单书籍
export const getRankBook = (url: any) => axios.get(url);
//请求书籍详情
export const getBookDetail = (id: any, title: any) => axios.get(`book/getsub.json?id=${id}&title=${title}`);

//请求书籍章节列表
export const getBookChapterList = (id: any) => axios.get(`reader/book/info.json?source_uuid=${id}`);
export const getPublishBookChapterList = (id: any) => axios.get(`book/catalog.json?tocId=${id}`);
//请求小说内容
export const getBookContent = (source_uuid: any, content_uuid: any) => axios.get(`reader/book/content.json?source_uuid=${source_uuid}&content_uuid=${content_uuid}`)
//请求书籍评论
export const getBookComment = (bookId: any) => axios.get(`comment/getComments.json?bookId=${bookId}`)
export const getNextBookComment = (url: any) => axios.get(url)
//获取评论全部回复
export const getAllReply = (url: any) => axios.get(url)
//获取出版书籍数据
export const getPublishNavInfo = (url: any) => axios.get(url)
//获取出版的书籍详情数据
export const getPublishBookDetailInfo = (id: any, title: any) => axios.get(`book/getsub.json?id=${id}&title=${title}`);
//获取听书详情数据
export const getBookListenDetailInfo = (id: any) => axios.get(`ting/source.json?sourceUuid=${id}`);
//获取30条音频数据
export const get30ListenAudioInfo = () => axios.get(`ting/download.json`);
//获取听书书籍的章节列表
export const getBookListenChapterInfo = (id: any) => axios.get(`ting/catalog.json?sourceUuid=${id}`);
//获取热门搜索词汇
export const getSearchHotWordsInfo = () => axios.get(`search/getHotWords`);
//搜索建议
export const getSearchSuggest = (str: string) => axios.get(`search/searchHint?search=${str}`);
//获取搜索结果
export const getSearchResult = (search: any) => axios.get(`search/book.json?keyword=${search}`);
//触底加载获取搜索结果
export const getSearchOnload = (keyword: any, page: any, sort: any, channel: any, bookStatus: any, pay: any, wordCount: any) => axios.get(`search/book.json?keyword=${keyword}&page=${page}&sort=${sort}&channel=${channel}&bookStatus=${bookStatus}&pay=${pay}&wordCount=${wordCount}`);
//获取所有频道分类
export const getAllCategoryInfo = () => axios.get(`mergedCategroy.json`);
//获取3级分类
export const getThirdCategoryInfo = (url: string) => axios.get(url);
//获取初始分类列表数据
export const getInitCategoryBookInfo = (catId: any, page: number) => axios.get(`source/v2/searchBook.json?catId=${catId}&page=${page}`);
//获取根据分类数据的加载书籍数据
export const getCategoryBookInfo = (catId: any, wordCount: number, pay: number, bookStatus: number, sort: number, page: number) => axios.get(`source/v2/searchBook.json?catId=${catId}&wordCount=${wordCount}&pay=${pay}&bookStatus=${bookStatus}&sort=${sort}&page=${page}`);
//获取书架的banner数据
export const getBookShelfBanner = () => axios.get(`shelf/banner.json`);
//获取书架推荐书籍
export const getBookShelfRecommend = () => axios.get(`shelf/info.json`);


